package com.kusiri.kframework.component
{
	import com.kusiri.kframework.IKfContext;
	import com.kusiri.kframework.KfContext;
	
	import mx.collections.ArrayCollection;

	/**
	 * 
	 */
	public class KfComponentCollection extends ArrayCollection implements IKfComponent
	{ 
		
		private var _name : String;
		
		/**
		 * A user definable name for the component, e.g. "My Table"
		 */
		public function get __name() : String
		{
			return _name;
		}
		
		/**
		 * A user definable name for the component, e.g. "My Table"
		 */
		public function set __name( name : String) : void
		{
			_name = name;
		}
		
		/**
		 * Tell the Component to get ready to be used.
		 * 
		 * Called from the KfComponentManager, not called directly.
		 * 
		 * Callback functions take component, and the error (if applicable) as the argument
		 */
		public function __initializeComponent(onSuccess : Function, onFail : Function) : void
		{
			onSuccess(this);
		}
		
	}
}